package com.mmcro.oauth.Token;

import lombok.AllArgsConstructor;
import lombok.Data;

import java.io.Serializable;
import java.util.Objects;

@Data
@AllArgsConstructor
public class ImageCredential implements Serializable {
    String password;
    String code;

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        ImageCredential that = (ImageCredential) o;
        return Objects.equals(password, that.password) && Objects.equals(code, that.code);
    }

    @Override
    public int hashCode() {
        return Objects.hash(password, code);
    }

    @Override
    public String toString() {
        return "ImageCredential{" +
                "password='" + password + '\'' +
                ", code='" + code + '\'' +
                '}';
    }
}
